/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.epam.expertsys;

import java.util.*;
import java.io.*;
import java.sql.*;

/**
 *
 * @author Admin
 */
public class Main {

    /**
     * @param args the command line arguments
     * @throws NullValue
     */
    public static void main(String[] args) throws Exception {



        FactsKnown Facts = FactsKnown.getInstance();
        RulesKnown Rules = RulesKnown.getInstance();

        int curPatientId = 1;
        int curDoctorId = 1;

        /*
        //Facts.readFactsFile(args[0]);
        //Rules.readRulesFile(args[1]);
        Facts.readFactsFile("TestFact.txt");
        Rules.readRulesFile("RulesOur.txt");

        Facts.printFacts();

        System.out.println("**************************");

        ExpertEvaluations.directDerivation("Testlog.log");

        Facts.printFacts();

        Facts.writeFactsFile("trilili.txt");*/
        //FileReader fileReader = new FileReader("Testfile.json");
        //BufferedReader bufReader = new BufferedReader(fileReader);

        Facts.printFacts();
        System.out.println("***");

        Facts.readFactsJsonFile("Testfile.json");

        //Facts.addFact(JsonParse.factParse(bufReader));
        //Facts.addFact(JsonParse.factParse(bufReader));
        //Connection cn = DriverManager.getConnection("jdbc:h2:MedicalDB", "sa", "123321");
        //Statement st = cn.createStatement();
        Facts.writeFactsDB("jdbc:h2:D:\\H2\\bin\\MedicalDB", "sa", "123321", 1, 1);

        Facts.printFacts();

        //bufReader.close();
    }
}
